﻿namespace GoodAdmin.System;

public class ConfigOutput
{
    /// <summary>
    /// 默认密码
    /// </summary>
    public string Sys_Default_Password { get; set; }
    /// <summary>
    /// 是否启用登录验证码
    /// </summary>
    public bool Sys_Captcha { get; set; }
    /// <summary>
    /// 密码错误次数
    /// </summary>
    public int Sys_password_wrong_number { get; set; }
    /// <summary>
    /// 密码错误次数达上限之后策略
    /// </summary>
    public string Sys_password_wrong_strategy { get; set; }
    /// <summary>
    /// 延时登录时间
    /// </summary>
    public int Sys_login_delay_time { get; set; }
    /// <summary>
    /// 是否单点登录
    /// </summary>
    public bool Single_Login { get; set; }
    /// <summary>
    /// 是否启用水印
    /// </summary>
    public bool Sys_WarterMark { get; set; }
    /// <summary>
    /// 文件存储类型
    /// </summary>
    public string File_Save_Type { get; set; }
    /// <summary>
    /// 文件存储地址
    /// </summary>
    public string File_Save_Path { get; set; }
}

public class SimpleConfig
{
    public long Id { get; set; }
    /// <summary>
    /// 名称
    /// </summary>
    public string Name { get; set; }

    /// <summary>
    /// 编码
    /// </summary>
    public string ConfigKey { get; set; }

    /// <summary>
    /// 属性值
    /// </summary>
    public string ConfigValue { get; set; }

    /// <summary>
    /// 类型
    /// </summary>
    public string Category { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }
}

/// <summary>
/// 配置菜单对象映射
/// </summary>
public class SysConfigMapper : IRegister
{
    public void Register(TypeAdapterConfig config)
    {
        config.ForType<SimpleConfig, SysConfig>();
    }
}